home *** CD-ROM | disk | FTP | other *** search
- Path: sun001.spd.dsccc.com!spd!jmccarty
- From: jmccarty@spd.dsccc.com (Mike McCarty)
- Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
- Subject: Re: Access carry flag from C
- Date: 23 Feb 1996 23:55:41 GMT
- Organization: DSC Communications Corporation, Plano, Texas USA
- Message-ID: <4glk5t$avt@sun001.spd.dsccc.com>
- References: <Dn1C9z.DGv.0.net@indra.com> <312AFACE.41C6@bazis.nl> <TANMOY.96Feb21081640@qcd.lanl.gov> <312D8414.167E@bazis.nl>
- NNTP-Posting-Host: aplo139.spd.dsccc.com
-
- In article <312D8414.167E@bazis.nl>, Franz Korntner <fkorntne@bazis.nl> wrote:
- )Tanmoy Bhattacharya wrote:
- )>
- )> In article <312AFACE.41C6@bazis.nl> Franz Korntner <fkorntne@bazis.nl>
- )> writes:
- )> <snip>
- )> 32 bit numbers. According to the (X3J11 / ANSI) standard, the constant
- )> INT_MAX (and in this case most limits in limits.h) denotes the minimal
- )> limit. It is possible that the physical limit is much higher (or lower
- )> in the case of negative values). As I am only interested in the physical
- )> limit, the value INT_MAX has no meaning. Only the compiler is fully aware
- )> of these limits (and not a header file!) and what I really miss in the
- )> standard and/or implementation is a inline function 'maxlimitof(int)',
- )> analogical to 'sizeof(int)'.
- )>
- )> Please quote the standard. I find no discussion of this in my copy;
- )> and I suspect it is incorrect.
- )
- )I only have a copy of the Rationale at this moment, and it is also mentioned
- )on page 17, Environmental limits.
- )
- )2.2.4.2.1 Sizes of integral types <limits.h>. Such a large body of C code
- )has been developed for the 8-bit byte machines that the integer sizes in
- )such environments must be considered normative. The prescribed limits are
- )minima; an implementation on a machine with 9-bit bytes can be conforming,
- )as can an implementation that defines int to be the same width as long.
- )page 17.
-
- ISO Standard
-
- 5.2.4.2.1 Sizes of integral types <limits.h>
-
- The values given below shall be replaced by constant expressions
- suitable for use in #if preprocessing directives. Morever, except
- for CHAR_BIT and MB_LEN_MAX, the following shall be replaced by
- expressions that have the same type as would an expression that
- is an object of the corresponding type converted according to the
- integral promotions. Their implementation-defined values shall be
- equal or greater in magnitude (absolute value) to those shown, with
- the same sign.
-
- Is that good enough? They may be larger.
-
- Mike
-
-
- ----
- char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
-
- I don't speak for DSC. <- They make me say that.
-